package com.g8.pethospitallearnbackend.service.impls;

import com.g8.pethospitallearnbackend.entity.Type;
import com.g8.pethospitallearnbackend.mapper.TypeMapper;
import com.g8.pethospitallearnbackend.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TypeServiceImpl implements TypeService {
    @Autowired
    private TypeMapper typeMapper;
    @Override
    public List<Type> getAllTypes() {
        return typeMapper.selectAllTypes();
    }

    @Override
    public String getTypeIdByName(String typeName) {
        return typeMapper.selectTypeIdByName(typeName);
    }

    @Override
    public Type getAType(String typeId) {
        return typeMapper.selectAType(typeId);
    }
}
